Skip to content

Commit 59d6c72

Browse files
committed
Fix linting and spelling problems
1 parent 4c25511 commit 59d6c72

34 files changed

+15
-38
lines changed

examples/alembic/alembic/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Generic single-database configuration.
1+
Generic single-database configuration.

examples/alembic/readme.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ The following steps were used to generate the migration.
1515
the [revision](alembic/versions)
1616

1717
The below shows you the diff from the default code generated by alembic:
18+
1819
```diff
1920
diff --git a/alembic.ini b/alembic.ini
2021
index bfcc3c7..f65a55d 100644
@@ -23,11 +24,11 @@ index bfcc3c7..f65a55d 100644
2324
@@ -35,7 +35,7 @@ script_location = alembic
2425
# are written from script.py.mako
2526
# output_encoding = utf-8
26-
27+
2728
-sqlalchemy.url = driver://user:pass@localhost/dbname
2829
+sqlalchemy.url = sqlite:///:memory:
29-
30-
30+
31+
3132
[post_write_hooks]
3233
diff --git a/alembic/env.py b/alembic/env.py
3334
index c58b79f..71f8edf 100644
@@ -36,7 +37,7 @@ index c58b79f..71f8edf 100644
3637
@@ -4,6 +4,10 @@ from alembic import context
3738
from sqlalchemy import engine_from_config
3839
from sqlalchemy import pool
39-
40+
4041
+import open_alchemy
4142
+
4243
+open_alchemy.init_yaml(spec_filename="../app/api.yaml")
@@ -50,7 +51,7 @@ index c58b79f..71f8edf 100644
5051
# target_metadata = mymodel.Base.metadata
5152
-target_metadata = None
5253
+target_metadata = open_alchemy.models.Base.metadata
53-
54+
5455
# other values from the config, defined by the needs of env.py,
5556
# can be acquired:
5657
```

examples/all_of/column-example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/all_of/model-example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/app/api.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/app/app.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Application code."""
22

33
import connexion
4-
54
import database
65

76
# Creating Flask app

examples/app/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Connexion App
22

33
To start the app:
4+
45
```python
56
python -m venv venv
67
source ./venv/bin/activate

examples/composite_index/example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/composite_unique/example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/default/example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/inheritance/joined-example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/inheritance/single-example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/json/example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/read_only/example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/ref/column-example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/ref/model-example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/relationship/many_to_many/example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/relationship/many_to_one/backref-example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/relationship/many_to_one/custom-foreign-key-example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/relationship/many_to_one/example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/relationship/many_to_one/kwargs-example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/relationship/many_to_one/not-nullable-example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/relationship/one_to_many/example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/relationship/one_to_one/example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/remote/example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/remote/url-example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/simple/example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

examples/write_only/example-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
openapi: "3.0.0"
32

43
info:

open_alchemy/helpers/inheritance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def retrieve_parent(*, schema: types.Schema, schemas: types.Schemas) -> str:
274274
)
275275
return inherits
276276
raise exceptions.InheritanceError(
277-
"Cannot retrive the name of the parent if x-inherits is not defined or False."
277+
"Cannot retrieve the name of the parent if x-inherits is not defined or False."
278278
)
279279

280280

open_alchemy/schemas/validation/property_/relationship/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def check(
2323
property_schema: The schema of the relationship property.
2424
2525
Returns:
26-
Whether the schema is valid and the reason if it is noe.
26+
Whether the schema is valid and the reason if it is not.
2727
2828
"""
2929
# Validate the property schema

open_alchemy/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
import typing
66

77
try: # pragma: no cover
8-
from typing import TypedDict
98
from typing import Literal
109
from typing import Protocol
10+
from typing import TypedDict
1111
except ImportError: # pragma: no cover
12-
from typing_extensions import TypedDict # type: ignore
1312
from typing_extensions import Literal # type: ignore
1413
from typing_extensions import Protocol # type: ignore
14+
from typing_extensions import TypedDict # type: ignore
1515

1616
Schema = typing.Dict[str, typing.Any]
1717
Schemas = typing.Dict[str, Schema]

tests/open_alchemy/utility_base/from_dict/test_simple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
@pytest.mark.utility_base
3232
def test_convert_invalid(schema, value, exception):
3333
"""
34-
GIVEN invaid schema and expected exception
34+
GIVEN invalid schema and expected exception
3535
WHEN convert is called with the schema
3636
THEN the expected exception is raised.
3737
"""

tests/open_alchemy/utility_base/to_dict/test_array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
@pytest.mark.utility_base
3737
def test_convert_invalid(schema, value, exception):
3838
"""
39-
GIVEN invaid schema and expected exception
39+
GIVEN invalid schema and expected exception
4040
WHEN convert is called with the schema
4141
THEN the expected exception is raised.
4242
"""

tests/open_alchemy/utility_base/to_dict/test_simple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
@pytest.mark.utility_base
5050
def test_convert_invalid(schema, value, exception):
5151
"""
52-
GIVEN invaid schema and expected exception
52+
GIVEN invalid schema and expected exception
5353
WHEN convert is called with the schema
5454
THEN the expected exception is raised.
5555
"""

0 commit comments

Comments
 (0)