[
https://issues.apache.org/jira/browse/BEAM-7746?focusedWorklogId=278430&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-278430
]
ASF GitHub Bot logged work on BEAM-7746:
----------------------------------------
Author: ASF GitHub Bot
Created on: 17/Jul/19 19:36
Start Date: 17/Jul/19 19:36
Worklog Time Spent: 10m
Work Description: chadrik commented on pull request #9056: [BEAM-7746]
Add python type hints
URL: https://github.com/apache/beam/pull/9056#discussion_r304606815
##########
File path: sdks/python/setup.py
##########
@@ -25,19 +25,71 @@
import sys
import warnings
from distutils.version import StrictVersion
+from distutils.errors import DistutilsError
# Pylint and isort disagree here.
# pylint: disable=ungrouped-imports
import setuptools
from pkg_resources import DistributionNotFound
from pkg_resources import get_distribution
+from pkg_resources import normalize_path
+from pkg_resources import to_filename
+from setuptools import Command
from setuptools.command.build_py import build_py
from setuptools.command.develop import develop
from setuptools.command.egg_info import egg_info
from setuptools.command.sdist import sdist
from setuptools.command.test import test
+class mypy(Command):
+ user_options = []
+
+ def initialize_options(self):
+ """Abstract method that is required to be overwritten"""
+
+ def finalize_options(self):
+ """Abstract method that is required to be overwritten"""
+
+ def get_project_path(self, include_dists=[]):
+ # with_2to3 = six.PY3 and getattr(self.distribution, 'use_2to3', False)
Review comment:
yeah, this command class is based off of several in the distutils source,
and it was unclear to me if we'd need to support this other case, so it's there
as a reminder to figure that out.
To be crystal clear, this PR is very much a WIP. Just wanted to get eyes on
it before I get too far ahead of myself.
----------------------------------------------------------------
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 278430)
Time Spent: 2.5h (was: 2h 20m)
> Add type hints to python code
> -----------------------------
>
> Key: BEAM-7746
> URL: https://issues.apache.org/jira/browse/BEAM-7746
> Project: Beam
> Issue Type: New Feature
> Components: sdk-py-core
> Reporter: Chad Dombrova
> Priority: Major
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
> As a developer of the beam source code, I would like the code to use pep484
> type hints so that I can clearly see what types are required, get completion
> in my IDE, and enforce code correctness via a static analyzer like mypy.
> This may be considered a precursor to BEAM-7060
> Work has been started here: [https://github.com/apache/beam/pull/9056]
>
>
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)