Title: Extra modules path doesn't work for single files. · Issue #259 · autocomplete-python/autocomplete-python · GitHub
Open Graph Title: Extra modules path doesn't work for single files. · Issue #259 · autocomplete-python/autocomplete-python
X Title: Extra modules path doesn't work for single files. · Issue #259 · autocomplete-python/autocomplete-python
Description: Steps to Reproduce Configure extra module paths (I've been using Blender modules - /usr/share/blender/2.78/scripts/modules) Open a single file (no project loaded) Trigger autocompletion for the external modules Expected behavior: The ext...
Open Graph Description: Steps to Reproduce Configure extra module paths (I've been using Blender modules - /usr/share/blender/2.78/scripts/modules) Open a single file (no project loaded) Trigger autocompletion for the ext...
X Description: Steps to Reproduce Configure extra module paths (I've been using Blender modules - /usr/share/blender/2.78/scripts/modules) Open a single file (no project loaded) Trigger autocompletion for the...
Opengraph URL: https://github.com/autocomplete-python/autocomplete-python/issues/259
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Extra modules path doesn't work for single files. ","articleBody":"### Steps to Reproduce\r\n\r\n1. Configure extra module paths (I've been using Blender modules - /usr/share/blender/2.78/scripts/modules)\r\n2. Open a single file (no project loaded)\r\n3. Trigger autocompletion for the external modules\r\n\r\n**Expected behavior:** The external modules should be present in the list. \r\n\r\n**Actual behavior:** Nope. The extraPaths are actually blanked out, so the config value is not used. \r\n\r\nThe issue is in interpreters-lookup.coffee. The modPaths array is only populated if projects are present. \r\n\r\n\r\n**Currently**\r\n```coffee\r\n applySubstitutions: (paths) -\u003e\r\n modPaths = []\r\n log.debug 'paths', paths\r\n for p in paths\r\n for project in atom.project.getPaths()\r\n [..., projectName] = project.split(path.sep)\r\n p = p.replace(/\\$PROJECT_NAME/i, projectName)\r\n p = p.replace(/\\$PROJECT/i, project)\r\n log.debug 'sub path', p\r\n if p not in modPaths\r\n modPaths.push p\r\n return modPaths\r\n```\r\n\r\n**Better**\r\n```coffee\r\n applySubstitutions: (paths) -\u003e\r\n modPaths = []\r\n log.debug 'paths', paths\r\n for p in paths\r\n for project in atom.project.getPaths()\r\n [..., projectName] = project.split(path.sep)\r\n p = p.replace(/\\$PROJECT_NAME/i, projectName)\r\n p = p.replace(/\\$PROJECT/i, project)\r\n log.debug 'sub path', p\r\n if p not in modPaths\r\n modPaths.push p\r\n return modPaths\r\n```\r\n\r\n","author":{"url":"https://github.com/rabidlogic","@type":"Person","name":"rabidlogic"},"datePublished":"2016-12-18T01:07:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/259/autocomplete-python/issues/259"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:03485921-8c6b-e573-4059-3193f58cc753 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED7A:300F19:76D9E69:99A83DB:6976438D |
| html-safe-nonce | 5f10dbe2947b1beb871f1ffa034be08e459253f0d832856543f0ba9cc8d4d859 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDdBOjMwMEYxOTo3NkQ5RTY5Ojk5QTgzREI6Njk3NjQzOEQiLCJ2aXNpdG9yX2lkIjoiMjcwODUzNDMzODU4NzYwNzk0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 76e560a770a58fb9289c2e9543d248196c72430a4ddbc0678a257345f7cafabb |
| hovercard-subject-tag | issue:196251938 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/autocomplete-python/autocomplete-python/259/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fa8f6376cc51c31a105d5edd24b481cc07a1066459a4dc1dd9d13b0750696fbb/autocomplete-python/autocomplete-python/issues/259 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fa8f6376cc51c31a105d5edd24b481cc07a1066459a4dc1dd9d13b0750696fbb/autocomplete-python/autocomplete-python/issues/259 |
| og:image:alt | Steps to Reproduce Configure extra module paths (I've been using Blender modules - /usr/share/blender/2.78/scripts/modules) Open a single file (no project loaded) Trigger autocompletion for the ext... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rabidlogic |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6814b4cc7afd45cd6e64525d0cff0e76dd802f315a5b0e55a7abda1d1d070d0 |
| turbo-cache-control | no-preview |
| go-import | github.com/autocomplete-python/autocomplete-python git https://github.com/autocomplete-python/autocomplete-python.git |
| octolytics-dimension-user_id | 22843876 |
| octolytics-dimension-user_login | autocomplete-python |
| octolytics-dimension-repository_id | 34786988 |
| octolytics-dimension-repository_nwo | autocomplete-python/autocomplete-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 34786988 |
| octolytics-dimension-repository_network_root_nwo | autocomplete-python/autocomplete-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4ea235bfed58ef16c8a5642b3ac64b74f10c9f52 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width