Skip to content

Commit

Permalink
Merge pull request #3 from kougen/fix/consistency
Browse files Browse the repository at this point in the history
Code consistency
  • Loading branch information
joshika39 authored Mar 23, 2024
2 parents f24bbde + 7082b12 commit cbf152a
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "repositories"
version = "1.0.0"
name = "pyrepositories"
version = "1.0.1"
authors = [
{ name="kougen", email="[email protected]" },
]
Expand Down
4 changes: 3 additions & 1 deletion scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
path_root = Path(__file__).parents[1]
sys.path.append(os.path.join(path_root, 'src'))

from repositories import DataSource, JsonTable, Entity
from pyrepositories import DataSource, JsonTable, Entity


class User(Entity):
Expand Down Expand Up @@ -38,6 +38,8 @@ def email(self, email):
table = JsonTable('users', os.path.join(path_root, 'scripts', 'data'))
datasource.add_table(table)

table = datasource.get_table('users')

user = User(1, 'John Doe', '[email protected]')
user2 = User(2, 'Jane Doe 2', '[email protected]')

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def remove_table(self, table):
if table in self.tables:
self.tables.remove(table)

def get_table(self, name) -> DataTable | None:
def get_table(self, name: str) -> DataTable | None:
for table in self.tables:
if table.get_name() == name:
return table
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit cbf152a

Please sign in to comment.