-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add pylint configuration #371
Conversation
1b14e34
to
bc9f5ad
Compare
but not tests yet
Flake lock file updates: • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/e08e100b0c6a6651c3235d1520c53280142d9d5f' (2023-08-05) → 'github:NixOS/nixpkgs/12bdeb01ff9e2d3917e6a44037ed7df6e6c3df9d' (2023-10-15)
move the strict enablement to the pyproject.toml so disabling checks works correctly because `--strict` takes precedence over the file Checking everything was disabled in 60205b9 due to (seemingly) a bug
remove redundant enables ``` --strict Strict mode; enables the following flags: --warn-unused-configs, --disallow-any-generics, --disallow- subclassing-any, --disallow-untyped-calls, --disallow-untyped-defs, --disallow-incomplete-defs, --check- untyped-defs, --disallow-untyped-decorators, --warn-redundant-casts, --warn-unused-ignores, --warn-return-any, --no-implicit-reexport, --strict-equality, --strict-concatenate ```
bc9f5ad
to
21e9292
Compare
Will fix more lints in a separate PR |
Ruff seems to support some pylint lints under |
@@ -297,7 +297,7 @@ def nix_build( | |||
def write_shell_expression( | |||
filename: Path, attrs: list[str], system: str, nixpkgs_config: Path | |||
) -> None: | |||
with open(filename, "w+") as f: | |||
with open(filename, "w+", encoding="utf-8") as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if you don't specify encoding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://pylint.pycqa.org/en/latest/user_guide/messages/warning/unspecified-encoding.html
It is better to specify an encoding when opening documents. Using the system default implicitly can create problems on other operating systems. See https://peps.python.org/pep-0597/
I guess it doesn't hurt.. checking should be still fast enough |
@mergify queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at c20b63f |
but not tests yet