Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution #333

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Solution #333

wants to merge 4 commits into from

Conversation

spryima
Copy link

@spryima spryima commented Oct 31, 2023

No description provided.

app/main.py Outdated
self.name = name
self.limitation_class = limitation_class

def can_access(self, visitor: Visitor) -> bool | str:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def can_access(self, visitor: Visitor) -> bool | str:
def can_access(self, visitor: Visitor) -> bool:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it returns True or False

app/main.py Outdated


class Slide:
pass

def __init__(self, name: str, limitation_class: Type) -> None:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def __init__(self, name: str, limitation_class: Type) -> None:
def __init__(self, name: str, limitation_class: SlideLimitationValidator) -> None:

Copy link

@vasylhnatiuk vasylhnatiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do it

@spryima spryima requested a review from vasylhnatiuk October 31, 2023 20:12
@spryima
Copy link
Author

spryima commented Oct 31, 2023

when I use this code
def init(self, name: str, limitation_class: SlideLimitationValidator) -> None:
i get
SlideLimitationValidator' object is not callable

this one works without such problem:
limitation_class: Type[SlideLimitationValidator]) -> None:

app/main.py Outdated
Comment on lines 62 to 63
else:
return True

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
else:
return True
return True

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else: is redundant in this case

Copy link

@ArsenPidhoretskyi ArsenPidhoretskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants