-
Notifications
You must be signed in to change notification settings - Fork 30
Adds Pyupgrade (UP) ruleset to ruff linter #661
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| from __future__ import with_statement | ||
| import os.path | ||
|
|
||
| MODULE_TEMPLATE = """.. Autogenerated by genmods.py | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| #!/usr/bin/env python | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| import sys | ||
| from bumps.names import FitProblem | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| #!/usr/bin/env python | ||
| # -*- coding: utf-8 -*- | ||
| """ | ||
| Fit model using multiple scattering. | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| from __future__ import print_function | ||
| import numpy as np | ||
| from numpy import exp, sin, degrees, radians, pi, sqrt | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| from __future__ import division, print_function | ||
| # Make sasmodels available on the path | ||
| import sys | ||
| import os | ||
|
|
@@ -375,7 +374,7 @@ def data_file(name): | |
|
|
||
| def load_sasfit(path): | ||
| data = np.loadtxt(path, dtype=str, delimiter=';').T | ||
| data = np.vstack((map(float, v) for v in data[0:2])) | ||
| data = np.vstack(map(float, v) for v in data[0:2]) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be failing. For version 2.2.6 that I happen to have installed, This is a bug in the original, which should have used [...] rather than (...) when forming the sequence to send to vstack, so not an error introduced by this PR.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for letting me know, I'll put in a one-liner PR to correct this. |
||
| return data | ||
|
|
||
| COMPARISON = {} # Type: Dict[(str,str,str)] -> Callable[(), None] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| from __future__ import division, print_function | ||
|
|
||
| import cmath | ||
| from copy import copy | ||
|
|
||
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.
Is this comment still needed now?
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.
Yes, I think so, because the
init_printingroutine is there to allow printing unicode characters.