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

Add stacklevel to across captum to satisfy flake8 #1382

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

craymichael
Copy link
Contributor

Summary:
Add stacklevel to silence flake8:

Warning (FLAKE8) B028
No explicit stacklevel argument found. The warn method from the warnings

stacklevel=1 default, stacklevel=2 in some spots that user might need more context

Differential Revision: D64518463

Zach Carmichael added 7 commits October 16, 2024 14:38
Summary: Reduce complexity of DataParallelMeta.make_single_dp_test

Differential Revision: D64370178
Summary:
Pull Request resolved: pytorch#1370

Reduce complexity of 'LimeBase.attribute'

Differential Revision: D64372053
Summary: Reduce complexity of 'sgd_train_linear_model'

Differential Revision: D64432524
Summary: Reduce complexity of 'sklearn_train_linear_model'

Differential Revision: D64438317
Summary: Reduce complexity of 'infidelity'

Differential Revision: D64451749
Summary: Reduce complexity of 'NoiseTunnel.attribute'

Differential Revision: D64502047
Summary:
Pull Request resolved: pytorch#1380

'TryExcept 6' is too complex (13) See https://www.flake8rules.com/rules/C901.html

Differential Revision: D64511308
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D64518463

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D64518463

craymichael added a commit to craymichael/captum that referenced this pull request Oct 17, 2024
Summary:
Pull Request resolved: pytorch#1382

Add stacklevel to silence flake8:

Warning  (FLAKE8) B028
    No explicit stacklevel argument found. The warn method from the warnings

stacklevel=1 default, stacklevel=2 in some spots that user might need more context

Differential Revision: D64518463
Zach Carmichael and others added 2 commits October 17, 2024 10:55
…atched" + minor typing fixes

Summary: Many overloads produced false positives or required changing order due to mypy breaking ties by picking the first matching variant (https://mypy.readthedocs.io/en/stable/more_types.html). This fixes or suppresses these errors. Created T204932142 to address Literal-related issues.

Differential Revision: D64517613
Summary:
Pull Request resolved: pytorch#1382

Add stacklevel to silence flake8:

Warning  (FLAKE8) B028
    No explicit stacklevel argument found. The warn method from the warnings

stacklevel=1 default, stacklevel=2 in some spots that user might need more context

Reviewed By: vivekmig

Differential Revision: D64518463
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D64518463

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants