Skip to content

Fix mypy on Windows #7803

@bmw

Description

@bmw

If you run mypy on Windows (or use --platform to make mypy behave like its on Windows), you'll get the following errors:

certbot/certbot/util.py:303: error: Name 'distro' is not defined
certbot/certbot/util.py:319: error: Name 'distro' is not defined
certbot/certbot/util.py:369: error: Name 'distro' is not defined
certbot/certbot/compat/filesystem.py:76: error: Module has no attribute "chown"

(The last error only shows up for me after fixing the first errors.)

I think we should probably fix these issues so our mypy tests can be run successfully on any OS. I think this is preferred so our code is tested in more scenarios and it really works on any platform. Alternatively, we could specify platform in mypy.ini which would tell mypy to treat the code like its running on that platform regardless of the underlying OS.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions