Skip to content

Commit

Permalink
Add typos CI check (pyinfra-dev#1234)
Browse files Browse the repository at this point in the history
Co-authored-by: simonhammes <[email protected]>
  • Loading branch information
simonhammes and simonhammes authored Nov 17, 2024
1 parent 612c59f commit ef8acef
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ jobs:
- run: pip install '.[test]'
- run: mypy

spell-check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/[email protected]

# Unit tests
#

Expand Down
19 changes: 19 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[files]
extend-exclude = [
"tests/facts/apt.SimulateOperationWillChange/upgrade.json",
"tests/words.txt",
]

[default]
extend-ignore-re = [
"shell\\('uptim'\\)",
'"fpr:::::::::',
'== "fpr":',
"00740ba1",
"forr something in",
"unknown tag 'forr'",
"nd6 options=",
]

[default.extend-words]
datas = "datas"
12 changes: 6 additions & 6 deletions pyinfra/operations/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def container(
+ networks: network list to attach on container
+ ports: port list to expose
+ volumes: volume list to map on container
+ env_vars: environment varible list to inject on container
+ env_vars: environment variable list to inject on container
+ pull_always: force image pull
+ force: remove a contaner with same name and create a new one
+ force: remove a container with same name and create a new one
+ present: whether the container should be up and running
+ start: start or stop the container
Expand Down Expand Up @@ -125,7 +125,7 @@ def image(image, present=True):
Manage Docker images
+ image: Image and tag ex: nginx:alpine
+ present: whether the Docker image should be exist
+ present: whether the Docker image should exist
**Examples:**
Expand Down Expand Up @@ -188,7 +188,7 @@ def volume(volume, driver="", labels=None, present=True):
if present:

if existent_volume:
host.noop("Volume alredy exist!")
host.noop("Volume already exists!")
return

yield handle_docker(
Expand Down Expand Up @@ -261,7 +261,7 @@ def network(

if present:
if existent_network:
host.noop("Alredy exist a network with {0} name!".format(network))
host.noop("Network {0} already exists!".format(network))
return

yield handle_docker(
Expand All @@ -284,7 +284,7 @@ def network(

else:
if existent_network is None:
host.noop("Ther is not network with {0} name!".format(network))
host.noop("Network {0} does not exist!".format(network))
return

yield handle_docker(
Expand Down

0 comments on commit ef8acef

Please sign in to comment.