turbaszek commented on a change in pull request #89:
URL: https://github.com/apache/kibble/pull/89#discussion_r513231592



##########
File path: kibble/__main__.py
##########
@@ -14,11 +14,24 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+import click
+from version import kibble_version
 
 
-def main():
-    print("Hello to kibble!")

Review comment:
       By removing `main` you had to adjust the setup.py which uses this 
function as entry point:
   ```
   ➜ kibble version
   Traceback (most recent call last):
     File "/Users/turbaszek/.pyenv/versions/kibble/bin/kibble", line 33, in 
<module>
       sys.exit(load_entry_point('apache-kibble', 'console_scripts', 
'kibble')())
     File "/Users/turbaszek/.pyenv/versions/kibble/bin/kibble", line 25, in 
importlib_load_entry_point
       return next(matches).load()
     File 
"/Users/turbaszek/.pyenv/versions/3.8.0/lib/python3.8/importlib/metadata.py", 
line 77, in load
       return functools.reduce(getattr, attrs, module)
   AttributeError: module 'kibble.__main__' has no attribute 'main'
   ```
   
   I would suggest to leave this function as in future we may need to do more 
than just starting the cli. For now I would suggest:
   ```py
   def main():
       cli()
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to