Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
EvaP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CourseEval
EvaP
Commits
bc5de68d
Unverified
Commit
bc5de68d
authored
Nov 15, 2021
by
Niklas Mohrin
Browse files
Options
Downloads
Patches
Plain Diff
Add Prettier to management command
parent
822b3f38
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
evap/evaluation/management/commands/format.py
+1
-0
1 addition, 0 deletions
evap/evaluation/management/commands/format.py
evap/evaluation/tests/test_commands.py
+2
-1
2 additions, 1 deletion
evap/evaluation/tests/test_commands.py
with
3 additions
and
1 deletion
evap/evaluation/management/commands/format.py
+
1
−
0
View file @
bc5de68d
...
@@ -11,3 +11,4 @@ class Command(BaseCommand):
...
@@ -11,3 +11,4 @@ class Command(BaseCommand):
def
handle
(
self
,
*
args
,
**
options
):
def
handle
(
self
,
*
args
,
**
options
):
subprocess
.
run
([
"
black
"
,
"
evap
"
],
check
=
False
)
# nosec
subprocess
.
run
([
"
black
"
,
"
evap
"
],
check
=
False
)
# nosec
subprocess
.
run
([
"
isort
"
,
"
.
"
],
check
=
False
)
# nosec
subprocess
.
run
([
"
isort
"
,
"
.
"
],
check
=
False
)
# nosec
subprocess
.
run
([
"
npx
"
,
"
prettier
"
,
"
--write
"
,
"
evap/static/ts/src
"
],
check
=
False
)
# nosec
This diff is collapsed.
Click to expand it.
evap/evaluation/tests/test_commands.py
+
2
−
1
View file @
bc5de68d
...
@@ -352,11 +352,12 @@ class TestFormatCommand(TestCase):
...
@@ -352,11 +352,12 @@ class TestFormatCommand(TestCase):
@patch
(
"
subprocess.run
"
)
@patch
(
"
subprocess.run
"
)
def
test_formatters_called
(
self
,
mock_subprocess_run
):
def
test_formatters_called
(
self
,
mock_subprocess_run
):
management
.
call_command
(
"
format
"
)
management
.
call_command
(
"
format
"
)
self
.
assertEqual
(
len
(
mock_subprocess_run
.
mock_calls
),
2
)
self
.
assertEqual
(
len
(
mock_subprocess_run
.
mock_calls
),
3
)
mock_subprocess_run
.
assert_has_calls
(
mock_subprocess_run
.
assert_has_calls
(
[
[
call
([
"
black
"
,
"
evap
"
],
check
=
False
),
call
([
"
black
"
,
"
evap
"
],
check
=
False
),
call
([
"
isort
"
,
"
.
"
],
check
=
False
),
call
([
"
isort
"
,
"
.
"
],
check
=
False
),
call
([
"
npx
"
,
"
prettier
"
,
"
--write
"
,
"
evap/static/ts/src
"
],
check
=
False
),
]
]
)
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment