Skip to content
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

Release v2.1.0 #73

Merged
merged 12 commits into from
Apr 11, 2020
Merged

Release v2.1.0 #73

merged 12 commits into from
Apr 11, 2020

Conversation

sco1
Copy link
Owner

@sco1 sco1 commented Mar 6, 2020

Changelog

[v2.1.0]

Added

Additional Details

This release adds the opinionated --suppress-dummy-args flag, as requested by #68. If this flag is set, TYP000-level errors are suppressed for "dummy" arguments, defined as _.

For example:

def foo(a: int, _) -> None:
    """This is a test function."""
    ...

Would not yield an ANN001 error for the dummy argument:

$ flake8 test.py
test.py:1:17: ANN001 Missing type annotation for function argument '_'
$ flake8 test.py --suppress-dummy-args
<No output>

The default value of this configuration option is False, so this addition should be transparent to existing users.

Also added in this PR are the pre-commit hooks to CI, as also done with the other repos in the organization. As part of this change, the explicit Flake8 step is removed, as the pre-commit hooks already run Flake8. The pre-commit hooks are also tied to a conditional to only run it in a single build environment, Python 3.8, rather than across all of them.

Closes #68

sco1 added 3 commits March 5, 2020 21:27
* Add conditionals to pre-commit steps so they only run for one Python environment (3.8)
* Remove explicit linting task, as it's captured by the flake8 pre-commit hook
@sco1 sco1 added this to the 2.1.0 milestone Mar 6, 2020
Copy link
Contributor

@MarkKoz MarkKoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't want to cache the pre-commit cache in CI?

azure-pipelines.yml Outdated Show resolved Hide resolved
@sco1
Copy link
Owner Author

sco1 commented Mar 6, 2020

I guess that would probably be helpful, oops 😄

Update pre-commit conditional to include an escape if a previous step has failed

Co-Authored-By: Mark <kozlovmark@gmail.com>
azure-pipelines.yml Show resolved Hide resolved
Co-Authored-By: Mark <kozlovmark@gmail.com>
Set minimum supported Python version to 3.6.1 to mitigate NamedTuple's lack of support for methods and defaults in Python 3.6.0
@sco1 sco1 merged commit 1fb0681 into master Apr 11, 2020
@sco1 sco1 deleted the dev-next branch April 11, 2020 18:30
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to ignore ANN001 errors for specific argument names
3 participants