Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pre-commit-hooks
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
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nimrod
pre-commit-hooks
Commits
7da948c8
Commit
7da948c8
authored
3 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
Poetry check hook fixes.
- Add a test file for that hook. - Fix the issues found.
parent
9728e45c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hooks/poetry_check.py
+4
-2
4 additions, 2 deletions
hooks/poetry_check.py
test_files/pyproject.toml
+18
-0
18 additions, 0 deletions
test_files/pyproject.toml
with
22 additions
and
2 deletions
hooks/poetry_check.py
+
4
−
2
View file @
7da948c8
"""
Validate
Docker Compose
files.
"""
"""
Validate
pyproject.toml
files.
"""
import
argparse
import
argparse
import
pathlib
import
pathlib
...
@@ -13,7 +13,9 @@ def main():
...
@@ -13,7 +13,9 @@ def main():
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
hooks
.
utils
.
check_executable
(
"
poetry
"
)
hooks
.
utils
.
check_executable
(
"
poetry
"
)
return
hooks
.
utils
.
bulk_check
(
return
hooks
.
utils
.
bulk_check
(
lambda
x
:
hooks
.
utils
.
check_dir
([
"
poetry
"
,
"
check
"
],
dir
=
x
),
lambda
x
:
hooks
.
utils
.
check_directory
(
[
"
poetry
"
,
"
check
"
],
directory
=
x
),
hooks
.
utils
.
unique_directories
(
args
.
file
),
hooks
.
utils
.
unique_directories
(
args
.
file
),
)
)
...
...
This diff is collapsed.
Click to expand it.
test_files/pyproject.toml
0 → 100644
+
18
−
0
View file @
7da948c8
[tool.poetry]
name
=
"mnpw"
version
=
"0.1.5"
description
=
"My Nagios plugin wrapper"
authors
=
[
"Adar Nimrod <nimrod@shore.co.il>"
]
license
=
"MIT"
homepage
=
"https://git.shore.co.il/shore/mnpw"
repository
=
"https://git.shore.co.il/shore/mnpw"
classifiers
=
[
"Development Status :: 4 - Beta"
,
"Environment :: Console"
,
"Intended Audience :: Information Technology"
,
"Intended Audience :: System Administrators"
,
"License :: OSI Approved :: MIT License"
,
"Topic :: System :: Monitoring"
,
"Topic :: System :: Systems Administration"
,
"Topic :: Utilities"
,
]
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
register
or
sign in
to comment