From 114fff8dcb71ed6f308309890f02a19badbfb5f3 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sun, 26 Feb 2023 18:29:38 -0500 Subject: [PATCH] Run Black over fiture --- .../test/fixtures/pylint/global_statement.py | 9 ++++-- ...t__tests__PLW0603_global_statement.py.snap | 32 +++++++++---------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/crates/ruff/resources/test/fixtures/pylint/global_statement.py b/crates/ruff/resources/test/fixtures/pylint/global_statement.py index 9e1d2ba43c115b..69bcc36775208d 100644 --- a/crates/ruff/resources/test/fixtures/pylint/global_statement.py +++ b/crates/ruff/resources/test/fixtures/pylint/global_statement.py @@ -1,6 +1,9 @@ -# # Adapted from: https://github.com/PyCQA/pylint/blob/b70d2abd7fabe9bfd735a30b593b9cd5eaa36194/tests/functional/g/globals.py +# Adapted from: +# https://github.com/PyCQA/pylint/blob/b70d2abd7fabe9bfd735a30b593b9cd5eaa36194/tests/functional/g/globals.py + CONSTANT = 1 + def FUNC(): pass @@ -54,7 +57,7 @@ def CONSTANT(): def override_func(): """Overriding a function should only throw a global statement error""" - global FUNC # [global-statement] + global FUNC # [global-statement] def FUNC(): pass @@ -66,7 +69,7 @@ def override_class(): """Overriding a class should only throw a global statement error""" global CLASS # [global-statement] - class CLASS(): + class CLASS: pass CLASS() diff --git a/crates/ruff/src/rules/pylint/snapshots/ruff__rules__pylint__tests__PLW0603_global_statement.py.snap b/crates/ruff/src/rules/pylint/snapshots/ruff__rules__pylint__tests__PLW0603_global_statement.py.snap index 0ca080c35125b0..1a630a78433c60 100644 --- a/crates/ruff/src/rules/pylint/snapshots/ruff__rules__pylint__tests__PLW0603_global_statement.py.snap +++ b/crates/ruff/src/rules/pylint/snapshots/ruff__rules__pylint__tests__PLW0603_global_statement.py.snap @@ -6,10 +6,10 @@ expression: diagnostics GlobalStatement: name: CONSTANT location: - row: 14 + row: 17 column: 4 end_location: - row: 14 + row: 17 column: 19 fix: ~ parent: ~ @@ -17,10 +17,10 @@ expression: diagnostics GlobalStatement: name: sys location: - row: 21 + row: 24 column: 4 end_location: - row: 21 + row: 24 column: 14 fix: ~ parent: ~ @@ -28,10 +28,10 @@ expression: diagnostics GlobalStatement: name: namedtuple location: - row: 27 + row: 30 column: 4 end_location: - row: 27 + row: 30 column: 21 fix: ~ parent: ~ @@ -39,10 +39,10 @@ expression: diagnostics GlobalStatement: name: CONSTANT location: - row: 33 + row: 36 column: 4 end_location: - row: 33 + row: 36 column: 19 fix: ~ parent: ~ @@ -50,10 +50,10 @@ expression: diagnostics GlobalStatement: name: CONSTANT location: - row: 40 + row: 43 column: 4 end_location: - row: 40 + row: 43 column: 19 fix: ~ parent: ~ @@ -61,10 +61,10 @@ expression: diagnostics GlobalStatement: name: CONSTANT location: - row: 47 + row: 50 column: 4 end_location: - row: 47 + row: 50 column: 19 fix: ~ parent: ~ @@ -72,10 +72,10 @@ expression: diagnostics GlobalStatement: name: FUNC location: - row: 57 + row: 60 column: 4 end_location: - row: 57 + row: 60 column: 15 fix: ~ parent: ~ @@ -83,10 +83,10 @@ expression: diagnostics GlobalStatement: name: CLASS location: - row: 67 + row: 70 column: 4 end_location: - row: 67 + row: 70 column: 16 fix: ~ parent: ~