-
Notifications
You must be signed in to change notification settings - Fork 11
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
remove 's' from entity on g context #90
Comments
hey @joegasewicz is this issue still open? |
Hi @kousikmitra yes go ahead, thank you 👌 Sent with GitHawk |
@joegasewicz can you give a brief? I couldn't find anything like that in the source code. |
@kousikmitra Sure thing. Currently, we set our entity object onto Flask's global context: thanks |
@kousikmitra Sorry, also since yoour last PR, i added linting and also testing on python 3.6, 3.7 & 3.8. Of course, you can still run pytest with pip of pipenv and then push your code up & then tox will get run on the repo. Also , if you do it like this you will probably need top run pylint as well, although like i said this does get run with tox on the repo. |
But @joegasewicz what if any table has |
@kousikmitra good point but its very unlikely because the resource name should be a noun & there's only 2 nouns with 's'
http://www.focus.olsztyn.pl/en-grammar-nouns-uncountable-s.html thank you |
Okay it looks alright. I didn't knew this fact. 😸 |
@joegasewicz there's another issue. There is test function in which it has a keyword |
@kousikmitra good spot. These are the places to update: The tests should now be able to take a noun such as Pick any name you like to replace |
@kousikmitra sorry, i edited the above comment to reconsider your point about words ending in 'ies'. If you are still unsure about this update we can keep the issue open & if anyone else in future agrees with this feature than we can revisit this at a later date... |
@joegasewicz ya this sounds good. Cause I am really not feeling this will be a good way of doing this. |
@kousikmitra perfectly understand, thanks for looking into this for now.
|
Maybe we should change the public API to make it more obvious that the entity_type is derived from the table name and not use |
Closing this, as we now have renamed |
when the entity data is assigned to Flask global context it can derive from a plural table entity name (especially if the user uses the tablename attribute). So removing the 's' makes it clearer when returning the global context entity value
The text was updated successfully, but these errors were encountered: