Skip to content

Commit f11cbaa

Browse files
[pre-commit.ci] pre-commit autoupdate (#385)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pycqa/isort: 7.0.0 → 8.0.1](PyCQA/isort@7.0.0...8.0.1) - [github.com/PyCQA/autoflake: v2.3.1 → v2.3.3](PyCQA/autoflake@v2.3.1...v2.3.3) - [github.com/psf/black-pre-commit-mirror: 25.12.0 → 26.3.1](psf/black-pre-commit-mirror@25.12.0...26.3.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 0190fcc commit f11cbaa

14 files changed

Lines changed: 21 additions & 31 deletions

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ repos:
1111
- id: check-yaml
1212
- id: check-added-large-files
1313
- repo: https://github.com/pycqa/isort
14-
rev: 7.0.0
14+
rev: 8.0.1
1515
hooks:
1616
- id: isort
1717
args: [--profile, black, --filter-files]
1818
- repo: https://github.com/PyCQA/autoflake
19-
rev: v2.3.1
19+
rev: v2.3.3
2020
hooks:
2121
- id: autoflake
2222
- repo: https://github.com/asottile/pyupgrade
2323
rev: v3.21.2
2424
hooks:
2525
- id: pyupgrade
2626
- repo: https://github.com/psf/black-pre-commit-mirror
27-
rev: 25.12.0
27+
rev: 26.3.1
2828
hooks:
2929
- id: black
3030
language_version: python3

ppafm/cli/fitting/fitting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def comp_msd(x=[]):
188188
parser.add_option( "--nobounds", action="store_true", help="Skipf the first optimization step with bounds", default=False)
189189
# fmt: on
190190

191-
(options, args) = parser.parse_args()
191+
options, args = parser.parse_args()
192192
opt_dict = vars(options)
193193
parameters.apply_options(opt_dict) # setting up all the options according to their
194194
x_new, bounds = set_fit_dict(opt=opt_dict)

ppafm/cli/fitting/plotLine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def selectLine(BIGarray, MIN, MAX, startingPoint, endPoint, nsteps):
5454
parser.add_option( "--nodisp", action="store_true", default=False, help="Do NOT show the " "plots on the screen", )
5555
# fmt: on
5656

57-
(options, args) = parser.parse_args()
57+
options, args = parser.parse_args()
5858
opt_dict = vars(options)
5959
if options.points == []:
6060
sys.exit("Error!! The '-p' or '--points' argument is required\npython plotLine.py -p XMINxYMINxZMIN XMAXxYMAXxZMAX")

ppafm/cli/fitting/plotZ.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,8 @@ def find_minimum(array, precision=0.0001):
2121
i += 1
2222

2323

24-
HELP_MSG = (
25-
"""Use this program in the following way:
26-
"""
27-
+ os.path.basename(main.__file__)
28-
+ """ -p "X1xY1" [-p "X2xY2" ...] """
29-
)
24+
HELP_MSG = """Use this program in the following way:
25+
""" + os.path.basename(main.__file__) + """ -p "X1xY1" [-p "X2xY2" ...] """
3026

3127
# fmt: off
3228
parser = OptionParser()
@@ -42,7 +38,7 @@ def find_minimum(array, precision=0.0001):
4238
# parser.add_option( "--yrange", action="store", type="float", help="y positions of the tip range (min,max,n) [A]", nargs=3)
4339
# fmt: on
4440

45-
(options, args) = parser.parse_args()
41+
options, args = parser.parse_args()
4642
opt_dict = vars(options)
4743
print(options)
4844
if options.npy:

ppafm/cli/plot_results.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def main(argv=None):
279279
os.makedirs(dir_name_amplitude)
280280

281281
if parameters.tiltedScan:
282-
(f_out, lvec, _, atomic_info_or_head) = io.load_vec_field(dirname + "/OutF", data_format=args.output_format)
282+
f_out, lvec, _, atomic_info_or_head = io.load_vec_field(dirname + "/OutF", data_format=args.output_format)
283283
dfs = common.Fz2df_tilt(
284284
f_out,
285285
parameters.scanTilt,
@@ -292,7 +292,7 @@ def main(argv=None):
292292
lvec_df[0] = lvec_df[0] + lvec_df[3] / lvec_3_norm * amplitude / 2
293293
lvec_df[3] = lvec_df[3] / lvec_3_norm * (lvec_3_norm - amplitude)
294294
else:
295-
(fzs, lvec, _, atomic_info_or_head) = io.load_scal_field(dirname + "/OutFz", data_format=args.output_format)
295+
fzs, lvec, _, atomic_info_or_head = io.load_scal_field(dirname + "/OutFz", data_format=args.output_format)
296296
if applied_bias:
297297
r_tip = parameters.Rtip
298298
for iz, z in enumerate(tip_positions_z):

ppafm/cli/utilities/cube2xsf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
parser.add_option( "-i", "--input", action="store", type="string", help="input file")
2020
parser.add_option( "-o", "--output", action="store", type="string", help="output file")
2121
# fmt: on
22-
(options, args) = parser.parse_args()
22+
options, args = parser.parse_args()
2323
if options.input == None:
2424
sys.exit("ERROR!!! Please, specify the input file with the '-i' option \n\n" + HELP_MSG)
2525

ppafm/cli/utilities/extract_densities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
parser.add_option( "--dz", action="store", type="float", help="use dz with step", default=-0.1 )
2121
parser.add_option( "--plot", action="store_false" , help="plot extracted ?", default=True )
2222
# fmt: on
23-
(options, args) = parser.parse_args()
23+
options, args = parser.parse_args()
2424

2525
fname, fext = os.path.splitext(options.i)
2626
fext = fext[1:]

ppafm/cli/utilities/fitPauli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
parser.add_option( "--not_plot", action="store_false" , help="do not-plot the lines above atoms", default= True )
3434
parser.add_option( "--debug", action="store_true" , help="plot and pr. all lines and data from fit",default= False )
3535
# fmt: on
36-
(options, args) = parser.parse_args()
36+
options, args = parser.parse_args()
3737

3838
# ====== functions
3939

ppafm/cli/utilities/plotQuad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
parser.add_option( "-i", action="store", type="string", help="input file", default='OutFz' )
1717
parser.add_option("-f","--data_format" , action="store", type="string", help="Specify the output format of the vector and scalar field. Supported formats are: xsf,npy", default="xsf")
1818
# fmt: on
19-
(options, args) = parser.parse_args()
19+
options, args = parser.parse_args()
2020

2121
try:
2222
points = np.genfromtxt(options.p)

ppafm/cli/utilities/plotZcurves.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
parser.add_option( "--iz", action="store", type="int", help="z-slice index to plot legend", default=15 )
1717
parser.add_option("-f","--data_format" , action="store", type="string", help="Specify the output format of the vector and scalar field. Supported formats are: xsf,npy", default="xsf")
1818
# fmt: on
19-
(options, args) = parser.parse_args()
19+
options, args = parser.parse_args()
2020

2121
try:
2222
points = np.genfromtxt(options.p)

0 commit comments

Comments
 (0)