winipedia-utils 0.1.51__py3-none-any.whl → 0.1.52__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of winipedia-utils might be problematic. Click here for more details.

@@ -327,11 +327,21 @@ def get_default_module_content() -> str:
327
327
  return '''"""module."""'''
328
328
 
329
329
 
330
+ def inside_frozen_bundle() -> bool:
331
+ """Return True if the code is running inside a frozen bundle."""
332
+ return getattr(sys, "frozen", False)
333
+
334
+
330
335
  def get_def_line(obj: Any) -> int:
331
336
  """Return the line number where a method-like object is defined."""
332
337
  if isinstance(obj, property):
333
338
  obj = obj.fget
334
339
  unwrapped = inspect.unwrap(obj)
340
+ if hasattr(unwrapped, "__code__"):
341
+ return int(unwrapped.__code__.co_firstlineno)
342
+ # getsourcelines does not work if in a pyinstaller bundle or something
343
+ if inside_frozen_bundle():
344
+ return 0
335
345
  return inspect.getsourcelines(unwrapped)[1]
336
346
 
337
347
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: winipedia-utils
3
- Version: 0.1.51
3
+ Version: 0.1.52
4
4
  Summary: A package with many utility functions
5
5
  License: MIT
6
6
  Author: Winipedia
@@ -26,7 +26,7 @@ winipedia_utils/logging/logger.py,sha256=tCcUwAVLVr3Bec7_i-SoKvBPNCJSEmyuvBW2gbq
26
26
  winipedia_utils/modules/__init__.py,sha256=e3CFaC3FhK4ibknFOv1bqOZxA7XeVwmLqWX7oajUm78,51
27
27
  winipedia_utils/modules/class_.py,sha256=fe0czYVM-UWGVcv6YdiP6SfMfX1asb7HeiWp1yLJVbA,3696
28
28
  winipedia_utils/modules/function.py,sha256=cHLGiD7huPdfwUDdI0IlbB_Pd4woWGgbyvrsjivHBpc,2987
29
- winipedia_utils/modules/module.py,sha256=JTJiRp9h6dNGv4O00LzD0UMsbsayNitYmZushaur2ns,13046
29
+ winipedia_utils/modules/module.py,sha256=UHgkiCkpFjrUrdjBd_U1oyDOJK4ikPHxs8P-0ykPk5M,13420
30
30
  winipedia_utils/modules/package.py,sha256=8l8GuGGh3JDvDrj0rAs6AgcRfKYPSj3DJRx-zdjbB3Q,13105
31
31
  winipedia_utils/oop/__init__.py,sha256=wGjsVwLbTVEQWOfDJvN9nlvC-3NmAi8Doc2xIrm6e78,47
32
32
  winipedia_utils/oop/mixins/__init__.py,sha256=PDK-cJcdRUfDUCz36qQ5pmMW07G133WtN49OpmILGNI,54
@@ -94,7 +94,7 @@ winipedia_utils/testing/tests/base/utils/utils.py,sha256=dUPDrgAxlfREQb33zz23Mfz
94
94
  winipedia_utils/testing/tests/conftest.py,sha256=8RounBlI8Jq1aLaLNpv84MW4ne8Qq0aavQextDOp5ng,920
95
95
  winipedia_utils/text/__init__.py,sha256=j2bwtK6kyeHI6SnoBjpRju0C1W2n2paXBDlNjNtaUxA,48
96
96
  winipedia_utils/text/string.py,sha256=pK_VQXxSZa8HqHY1a6oMKfmN-OKteFE32eZaweCI22E,3508
97
- winipedia_utils-0.1.51.dist-info/LICENSE,sha256=3PrKJ2CWNrnyyHaC_r0wPDSukVWgmjOxHr__eQVH7cw,1087
98
- winipedia_utils-0.1.51.dist-info/METADATA,sha256=D8bNuYhq29m05i1tu4mGkZNc7ZCM4ihmqYnAprR6csE,12576
99
- winipedia_utils-0.1.51.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
100
- winipedia_utils-0.1.51.dist-info/RECORD,,
97
+ winipedia_utils-0.1.52.dist-info/LICENSE,sha256=3PrKJ2CWNrnyyHaC_r0wPDSukVWgmjOxHr__eQVH7cw,1087
98
+ winipedia_utils-0.1.52.dist-info/METADATA,sha256=fTxB0krCBPtvXEJZ7BRv13rnHFkuQOA1-eb6jWc6vfw,12576
99
+ winipedia_utils-0.1.52.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
100
+ winipedia_utils-0.1.52.dist-info/RECORD,,