-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrating
anaconda-linter
to the Packaging Automation Team Standards
- `percy` and `perseverance-scripts` walked so `anaconda-linter` could run - Backports the configurations and learnings from our previous projects to provide a more consistent and convenient set of automated code checks - Not all of these rules will be enforced at this time. Expect an auto- formatter PR in the near term, but the `pylint` and `mypy` rules will be much futher down the line
- Loading branch information
1 parent
e46317d
commit 7cc1b96
Showing
10 changed files
with
596 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[run] | ||
omit = | ||
tests/* | ||
*/__init__.py |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
[mypy] | ||
# Adapted from this StackOverflow post: | ||
# https://stackoverflow.com/questions/55944201/python-type-hinting-how-do-i-enforce-that-project-wide | ||
python_version = 3.11 | ||
|
||
# This flag enhances the user feedback for error messages | ||
pretty = True | ||
|
||
# Disallow dynamic typing | ||
disallow_any_unimported = True | ||
disallow_any_expr = True | ||
disallow_any_decorated = True | ||
disallow_any_generics = True | ||
disallow_any_explicit = True | ||
disallow_subclassing_any = True | ||
|
||
# Disallow untyped definitions and calls | ||
disallow_untyped_calls = True | ||
disallow_untyped_defs = True | ||
disallow_incomplete_defs = True | ||
check_untyped_defs = True | ||
disallow_untyped_decorators = True | ||
|
||
# None and optional handling | ||
no_implicit_optional = True | ||
|
||
# Configuring warnings | ||
warn_unused_ignores = True | ||
warn_no_return = True | ||
warn_return_any = True | ||
warn_redundant_casts = True | ||
warn_unreachable = True | ||
|
||
# Misc things | ||
strict_equality = True | ||
|
||
# Config file | ||
warn_unused_configs = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.