Skip to content

Conversation

@Benjamin-Loison
Copy link
Contributor

Verified exhaustiveness with:

find -name '*.rst'

Verified exhaustiveness with:

```bash
find -name '*.rst'
```
Copy link
Collaborator

@altendky altendky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for an easy review! And the improvements. :] What do you think of using python-console for those blocks as in the suggestions?

args, kw)``. For example::
args, kw)``. For example:

.. code-block:: python
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. code-block:: python
.. code-block:: python-console

The output can be redirected to a log file by passing IO stream as
parameter to the decorator like @profile(stream=fp)

.. code-block:: python
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. code-block:: python
.. code-block:: python-console

The output can be redirected to logger module by simply making use of
LogFile of memory profiler module.

.. code-block:: python
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. code-block:: python
.. code-block:: python-console

by passing True to reportIncrementFlag, where reportIncrementFlag is
a parameter to LogFile class of memory profiler module.

.. code-block:: python
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. code-block:: python
.. code-block:: python-console


and is exposed by the API

.. code-block:: python
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. code-block:: python
.. code-block:: python-console

be evaluated or a tuple ``(f, args, kw)`` containing a function and its
arguments to be evaluated as ``f(*args, **kw)``. For example,

.. code-block:: python
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. code-block:: python
.. code-block:: python-console

@Benjamin-Loison
Copy link
Contributor Author

Benjamin-Loison commented Oct 22, 2023

Thank you for suggesting using Python console syntax highlighting, I like the idea of using it to be more precise. However, as this code snippet shows in the Preview tab, it has a syntax highlighting for the indented code (by precising Python syntax highlighting), but not when using Python console syntax highlighting. Without even talking about the rendering in the Code tab which doesn't work at all for Python console syntax highlighting.

So Python console GitHub syntax highlighting rendering doesn't seem perfect yet, hence I don't have any strong opinion and I let you choose the one you prefer.

Copy link
Collaborator

@altendky altendky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always something, isn't it... Oh well.

@altendky altendky merged commit a99a3c3 into pythonprofilers:master Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants