Code Monkey home page Code Monkey logo

Comments (8)

jsupratman13 avatar jsupratman13 commented on August 22, 2024 1

Modules Contentのトップに__init__.pyの文章が追加されます。
Screenshot from 2022-02-24 13-03-45

from .github.

jsupratman13 avatar jsupratman13 commented on August 22, 2024 1

一応最近docstringが以下のwarning が出てきます

Screenshot from 2023-01-25 12-40-52

英文書き方についてのwarningなのでignoreしてもいいかも

from .github.

Tacha-S avatar Tacha-S commented on August 22, 2024

関連
https://github.com/sbgisen/cube_python_api/pull/70

@jsupratman13
ちなみに__init__.pyにdocstring書くことでsphinxで生成されるドキュメントって何か変わりますか?

from .github.

jsupratman13 avatar jsupratman13 commented on August 22, 2024

追記:__init__.pyの文章はsubmodulesには含まれません。

from .github.

Tacha-S avatar Tacha-S commented on August 22, 2024

追記:__init__.pyの文章はsubmodulesには含まれません。

なるほど。
ローカルで見たとき何も反映されてないかと思ったのはそのせいか...

from .github.

jsupratman13 avatar jsupratman13 commented on August 22, 2024

ドキュメント表示の話しになるけど sbgisen/cube_python_api#71

from .github.

Tacha-S avatar Tacha-S commented on August 22, 2024

D104に限らず、

  • 日本語のドキュメントでのD415(First line should end with a period, question mark, or exclamation point)
  • バックスラッシュを使用しているところでのD301(Use r""" if any backslashes in a docstring)

などがsphinxのdocument生成の成否にかかわらず警告されるので検討する。

from .github.

Tacha-S avatar Tacha-S commented on August 22, 2024

docstringの有無だけflake8-docstringsにまかせて、
あとはhttps://github.com/peterjc/flake8-rst-docstrings を使うというのもありかもしれません。

https://github.com/sbgisen/cube_python_api でのflake8-rst-docstrings

flake8 ./src
./src/cube_python_api/__init__.py:1:1: D104 Missing docstring in public package
./src/cube_python_api/cube_commander.py:106:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/cube_commander.py:132:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/cube_commander.py:164:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/cube_commander.py:208:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/utils/__init__.py:1:1: D104 Missing docstring in public package
./src/cube_python_api/utils/geometry.py:39:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/utils/geometry.py:60:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/utils/geometry.py:129:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/utils/message_generation.py:53:1: RST213 Inline emphasis start-string without end-string.
./src/cube_python_api/utils/message_generation.py:117:1: RST213 Inline emphasis start-string without end-string.
./src/cube_python_api/utils/message_generation.py:179:1: RST213 Inline emphasis start-string without end-string.
./src/cube_python_api/utils/message_generation.py:181:1: RST210 Inline strong start-string without end-string.
./src/cube_python_api/utils/message_generation.py:238:1: RST213 Inline emphasis start-string without end-string.
./src/cube_python_api/utils/message_generation.py:240:1: RST210 Inline strong start-string without end-string.
./src/cube_python_api/utils/message_generation.py:307:1: RST213 Inline emphasis start-string without end-string.
./src/cube_python_api/utils/message_generation.py:309:1: RST210 Inline strong start-string without end-string.
./src/cube_python_api/utils/decorator.py:34:1: RST213 Inline emphasis start-string without end-string.
./src/cube_python_api/utils/decorator.py:99:1: RST213 Inline emphasis start-string without end-string.
./src/cube_python_api/utils/decorator.py:158:1: RST213 Inline emphasis start-string without end-string.
./src/cube_python_api/utils/message_conversion.py:47:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/utils/message_conversion.py:211:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/utils/message_conversion.py:323:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/utils/message_conversion.py:435:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/utils/message_conversion.py:566:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/utils/message_conversion.py:715:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/utils/message_conversion.py:835:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/managers/move_base_manager.py:127:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/managers/__init__.py:1:1: D104 Missing docstring in public package
./src/cube_python_api/managers/battery_status_manager.py:210:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/managers/speech_manager.py:49:1: D301 Use r""" if any backslashes in a docstring
./src/cube_python_api/proxies/publisher.py:94:1: RST213 Inline emphasis start-string without end-string.
./src/cube_python_api/proxies/publisher.py:94:1: RST210 Inline strong start-string without end-string.
./src/cube_python_api/proxies/__init__.py:1:1: D104 Missing docstring in public package
./src/cube_python_api/proxies/service_proxy.py:83:1: RST213 Inline emphasis start-string without end-string.
./src/cube_python_api/proxies/service_proxy.py:83:1: RST210 Inline strong start-string without end-string.
./src/cube_python_api/proxies/service_proxy.py:114:1: RST213 Inline emphasis start-string without end-string.
./src/cube_python_api/proxies/service_proxy.py:114:1: RST210 Inline strong start-string without end-string.

RST210, 213は*args**kwargs*が強調表現と捉えられて片側しか無いとか中に何もないというので怒られていてまだissue段階のようですが...
peterjc/flake8-rst-docstrings#18

from .github.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.