Skip to content

Commit

Permalink
Refactor import statements in Cookie.py and request.py
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmancuso committed Oct 16, 2024
1 parent 104300c commit 3df7e13
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/masonite/cookies/Cookie.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from masonite.configuration import config
from ..configuration import config


class Cookie:
Expand Down
4 changes: 2 additions & 2 deletions src/masonite/request/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ def only(self, *inputs: str) -> dict:
"""Pass arguments as string arguments such as request.only("arg1", "arg2") to get back a dictionary of only those inputs."""
return self.input_bag.only(*inputs)

def old(self, key: str):
def old(self, key: str, default: str = "") -> str:
"""Get value from session for the given key."""
return old_helper(key)
return old_helper(key, default)

def is_not_safe(self) -> bool:
"""Check if the current request is considered 'safe', meaning that the request method is
Expand Down
2 changes: 1 addition & 1 deletion tests/features/validation/test_request_validation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from tests import TestCase
from masonite.validation import email, isnt, is_in, numeric
from src.masonite.validation import email, isnt, is_in, numeric
from src.masonite.validation import Validator


Expand Down

0 comments on commit 3df7e13

Please sign in to comment.