-
Notifications
You must be signed in to change notification settings - Fork 159
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
update reference docs #131
Open
anubrag
wants to merge
2
commits into
main
Choose a base branch
from
add-ref-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.db | ||
*.py[cod] | ||
.web | ||
__pycache__/ |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion
1
nextpy/backend/module/email/__init__.py → ...yled_example/unstyled_example/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# This file has been modified by the Nextpy Team in 2023 using AI tools and automation scripts. | ||
# We have rigorously tested these modifications to ensure reliability and performance. Based on successful test results, we are confident in the quality and stability of these changes. | ||
|
||
"""The email package builts on top of fastapi-mail.""" |
54 changes: 54 additions & 0 deletions
54
app-examples/unstyled_example/unstyled_example/unstyled_example.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import nextpy as xt | ||
|
||
|
||
class CounterState(xt.State): | ||
value: int = 0 | ||
|
||
def change_value(self, amount): | ||
self.value += amount | ||
|
||
|
||
def create_button(label, amount): | ||
return xt.unstyled.button( | ||
label, | ||
on_click=lambda: CounterState.change_value(amount) | ||
) | ||
|
||
|
||
def index() -> xt.Component: | ||
heading_color = xt.match( | ||
CounterState.value, | ||
(0, "red"), | ||
(4, "blue"), | ||
(8, "green"), | ||
(12, "orange"), | ||
(16, "lime"), | ||
(20, "orange"), | ||
"black" | ||
) | ||
|
||
return xt.unstyled.flex( | ||
xt.unstyled.heading( | ||
CounterState.value, | ||
color="white", | ||
background_color=heading_color, | ||
as_="h2" | ||
), | ||
xt.unstyled.flex( | ||
create_button("decrement", -1), | ||
create_button("increment", 1), | ||
gap="2" | ||
), | ||
align_items="center", | ||
direction="column", | ||
gap="2" | ||
) | ||
|
||
|
||
# Global styles defined as a Python dictionary | ||
style = { | ||
"text_align": "center", | ||
} | ||
|
||
app = xt.App(style=style) | ||
app.add_page(index) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import nextpy as xt | ||
|
||
config = xt.Config( | ||
app_name="unstyled_example", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"""The email package.""" | ||
|
||
from .config import EmailConfig | ||
from .message import EmailMessage | ||
from .sender import EmailSender | ||
from .email_template import EmailTemplateManager | ||
from .exceptions import EmailConfigError, EmailSendError | ||
|
||
__all__ = [ | ||
'EmailConfig', | ||
'EmailSender', | ||
'EmailMessage', | ||
'EmailTemplateManager', | ||
'EmailConfigError', | ||
'EmailSendError' | ||
] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
The
change_value
method from theCounterState
class is being called directly from the class in the provided context, which may not be the intended usage if it's supposed to be an instance method. This could lead to issues since the method would not have access to instance-specific data.Analysis chain
The
CounterState
class is a simple state management example. Ensure that thechange_value
method is correctly bound to instances ofCounterState
when used.Scripts Executed
The following scripts were executed for the analysis:
Script:
Length of output: 197