CelestialGuru
CelestialGuru
Tab autocomplete in python interactive shell unavailable when using Python versions 3.9, 3.10 or 3.11. Python documents this feature: https://docs.python.org/3.11/tutorial/interactive.html#tab-completion-and-history-editing. (Docs here are the same in all versions of Python)...
Trying to upload `cloudformation-template-service.yaml` in AWS CloudFormation I get the following exception: ``` Cannot render the template because of an error.: YAMLException: duplicated mapping key at line 71, column 71:...
# Issue When I run `pre-commit run --all-files` I get the following: ``` Trim Trailing Whitespace.................................................Passed Fix End of Files.........................................................Passed Check Yaml...............................................................Passed Check for added large files..............................................Passed yamllint.................................................................Passed Format YAML...
**Describe the bug** Take this code: ```python import re match = re.match(r"(?PLD|MD|HD)(?PAL|SS)", "HDSS") match (match.group("grade"), match.group("material")): case ("MD" | "HD", "SS" as code): print("You will get here") ``` And run...
Fixes bug when using `Exists` subqueries which are or-ed together: ```python SomeModel.objects.filter( Exists(RelatedModelA.objects.filter(some_model=OuterRef("pk")) | Exists(RelatedModelB.objects.filter(some_model=OuterRef("pk")) ) ``` This is done usually for performance reasons, but it is a valid queryset....
Here are three polymorphic models, each with different mixins: ```python class ModelMixin(models.Model): class Meta: abstract = True created_at = models.DateTimeField(auto_now_add=True) modified_at = models.DateTimeField(auto_now=True) class PolymorphicMixin(PolymorphicModel): class Meta: abstract = True...
Here's my filterset: ```python class LockFilterSet(filterset.FilterSet): class Meta: model = models.Lock fields = () grate_widths = filterset.ModelMultipleChoiceFilter( field_name="grate_width", queryset=configuration_models.SizeClass.objects.all(), method="filter_grate_widths", ) def filter_grate_widths(self, queryset, name, value): return queryset.filter(Q(**{f"{name}__in": value}) |...
I cannot figure out how to write a `settings.py` which could work in both a development environment and a production environment. On an EC2 staging instance the following works: ```python...
There is no way to catch an exception that is thrown inside of a Timer's callback method. Instead a Completer is used and whichever of the timeout or native channel...