Re: Detect naming typos (AttributeError) in function names

2023-11-06 Thread George Fischhof via Python-list
Dieter Maurer via Python-list  ezt írta (időpont:
2023. nov. 6., H, 19:13):

> c.bu...@posteo.jp wrote at 2023-11-6 12:47 +:
> >I would like to know how to detect (e.g. via a linter) typos in function
> >names imported from another module.
>
> One option is a test suite (--> Python's "unittest" package)
> with a sufficiently high coverage (near 100 %).
> --
> https://mail.python.org/mailman/listinfo/python-list
>


Hi

PyCharm IDE warns you, also vulture
https://pypi.org/project/vulture/
finds dead code (not called / not used because of typo), and if you compile
the code:
https://docs.python.org/3/library/py_compile.html
it will generate syntax error if non-existent function is called.
linters can perhaps warn you (never had typos, because I use PyCharm)
need to check the linters' doc

BR,
George
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to go about describing my software with a component diagram?

2024-12-24 Thread George Fischhof via Python-list
marc nicole via Python-list  ezt írta (időpont:
2024. dec. 24., K 22:09):

> The full python package (pypi) being represented as the outermost frame
> here including the 4 sub-frames)
>
> Le mar. 24 déc. 2024 à 22:05, marc nicole  a écrit :
>
> > I want to convey the idea that main.py (main algorithm) imports 3 modules
> > (V, S, M) (each of them containing .py scripts related to
> > different functionalities) and use their methods accordingly as per the
> > requirement: basically the structure of my code and how the modules
> relate
> > to each other.
> >
> > Le mar. 24 déc. 2024 à 21:56, dn via Python-list  >
> > a écrit :
> >
> >> On 25/12/24 06:27, marc nicole via Python-list wrote:
> >> > Hello community,
> >> >
> >> > I have created a Python code where a main algorithm uses three
> different
> >> > modules (.py) after importing them.
> >> >
> >> > To illustrate and describe it I have created the following component
> >> > diagram?
> >> >
> >> >
> >> > [image: checkso.PNG]
> >> >
> >> > Could it be improved for better description and readability?
> >>
> >>
> >> Possibly - so little detail as to topic and any hints in the diagram
> >> redacted! What messages do you want to communicate with this diagram?
> >>
> >> Given that the three modules are subordinate contributors to the
> >> script/algorithm, place the three modules inside a larger "Algorithm"
> >> shape.
> >>
> >> --
> >> Regards,
> >> =dn
> >> --
> >> https://mail.python.org/mailman/listinfo/python-list
> >>
> >
> --
> https://mail.python.org/mailman/listinfo/python-list



Hi,

also there are some tools which can generate class hierarchy diagram from
code.
for example here is a post
https://stackoverflow.com/questions/77421030/how-to-generate-the-uml-diagram-from-the-python-code

pyreverse is now part of pylint if I remember well.

BR
George

>
>
-- 
https://mail.python.org/mailman/listinfo/python-list